package mylibrary.thread.waitAndNotify2;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class WaxOMatic {

	public static void main(String[] args) throws InterruptedException {
		Car car = new Car();
		ExecutorService exec = Executors.newCachedThreadPool();
		exec.execute(new WaxOff(car));
		exec.execute(new WaxOn(car));
		
		Thread.sleep(5000);
		
		exec.shutdown();
	}
}
